Skip to content

Conversation

@nordic-krch
Copy link
Contributor

…ed access

Decoder was casting uint8_t pointers to uint64_t pointers which could result in double word instruction which does not support unaligned access on Cortex-M. Issue was revealed when -O3 optimization was used instead of -Os. In size optimized version, compiler was using word load and store instructions which support unaligned access and issue was not visible.

Upstream PR: zephyrproject-rtos/zephyr#79009

…ed access

Decoder was casting uint8_t pointers to uint64_t pointers which could
result in double word instruction which does not support unaligned
access on Cortex-M. Issue was revealed when -O3 optimization was
used instead of -Os. In size optimized version, compiler was
using word load and store instructions which support unaligned
access and issue was not visible.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit ddf753c)
@nordic-krch nordic-krch force-pushed the ncs/stp_dec_unaligned_fix branch from dab52e7 to c21e8ad Compare October 9, 2024 14:23
@kapi-no kapi-no added this to the ncs-2.8.0 milestone Oct 9, 2024
@rlubos rlubos merged commit 9a51d12 into nrfconnect:main Oct 16, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants